package com.im.chat.dao;

import com.im.chat.base.BaseMapper;
import com.im.chat.model.ChatRecord;
import org.apache.ibatis.annotations.Param;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface ChatRecordMapper extends BaseMapper<ChatRecord> {
    int updateAdminUnReadRecordByMemberId(@Param("chatId")Long  chatId,@Param("memberId")Long memberId);
    int updateMemberUnReadRecordByAdminId(@Param("chatId") long chatId, @Param("adminId")long adminId);

    int getAdminUnReadRecordByMemberId(@Param("chatId")Long  chatId,@Param("memberId")Long memberId);
    int getMemberUnReadRecordByAdminId(@Param("chatId") long chatId, @Param("adminId")long adminId);


    int updateDelStatusByMsgUniqueCode(HashMap<String, Object> map);


    public List<Long> getChatIdsBySearchNameAndAdminId(@Param("searchName")String searchName, @Param("adminId")Long adminId);

    public List<ChatRecord> getChatRecordBySearchName(@Param("searchName")String searchName,@Param("adminId") Long adminId, @Param("chatId") Long chatId);

}
